1. Field of the Invention
The present invention relates to a sensor circuit.
2. Description of the Related Art
Today's electronic devices are mounted with various sensor circuits. For example, a magnetic sensor circuit which detects the magnetism of a magnet is installed in one electronic device. This electronic device has a mechanism for folding a part of its main body. The folding mechanism has a magnet and a magnetic sensor circuit. Opening and closing the folding mechanism causes a change in distance between the magnet and the magnetic sensor circuit, thus changing the magnetic flux density of a magnetic field generated by the magnet, which is applied to the sensor circuit. A magnetic flux density equal to or larger than a given value means that the folding mechanism is open, and a magnetic flux density smaller than the given value means that the folding mechanism is closed.
An output signal of a sensor circuit in general has a temperature coefficient. Some sensor circuits are equipped with a temperature compensation circuit which compensates the temperature in order to cancel out the temperature coefficient.
A temperature compensation circuit installed in a conventional magnetic sensor circuit is described. FIG. 7 is a diagram illustrating a temperature compensation circuit installed in a conventional magnetic sensor circuit.
A current source 14 supplies a current that has a temperature coefficient to a current source 5 based on a constant voltage from a band gap reference voltage generating circuit 11. A current from the current source 5 drives sensor elements 2 and 3. The temperature coefficient of the current from the current source 14 cancels out the temperature coefficient of an output signal of the sensor circuit (see JP 10-253728 A, for example).
However, the band gap reference voltage generating circuit 11 and various current sources necessary for temperature compensation increase the circuit scale.